home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 10
/
FM Towns Free Software Collection 10.iso
/
ms_dos
/
tool
/
conhlp03
/
fswchsrc
/
dispprog.c
next >
Wrap
C/C++ Source or Header
|
1995-02-20
|
894b
|
47 lines
/*
dispprog.c
1994/02/?? 1994/03/02
*/
#include "fswch.h"
char *koumoku( char *k ); /* 項目とりだし */
char *dispprog( int nprog ){ /* nprog 番号の作品 作者の表示 */
static char prog[85],maker[85];
fpos_t ptr;
char *pp,*mp,k=NULL;
int i;
ptr = idxptr[nprog];
fsetpos(idxfp,&ptr);
fgets( prog, 84,idxfp );
pp = koumoku( prog );
for( i = 0 ; *(pp+i) >= ' ' && i < 40 ; i++ ){
k = isck(k,*(pp+i));
}
if( i == 40 ){
*(pp+i) = NULL;
if( k == 1 ) *(pp+39) = NULL;
}
fgets( maker, 84,idxfp );
mp = koumoku( maker );
for( i = 0 ; *(mp+i) >= ' ' && i < 20 ; i++ ){
k = isck(k,*(mp+i));
}
if( i == 20 ){
*(mp+i) = NULL;
if( k == 1 ) *(mp+19) = NULL;
}
/* 作者名の登録 */
/* mk = ... */
cprintf( ESC_SKYBULE "作品:%4d " ESC_WHITE "[%-40s] "\
ESC_GREEN"作者" ESC_WHITE "[%-20s]\r\n",
nprog,pp,mp);
return pp;
}